<!-- target: foodNewProductForm(master = formPage) -->
<!-- block: crumb -->
    <!-- import: foodNewProductFormCrumb -->
<!-- /block -->
<!-- block: formMain -->
    <!-- import: foodNewProductFormMain -->
<!-- /block -->

<!-- target: foodNewProductFormCrumb(master = crumb) -->
<!-- block: path -->
    <span>菜品</span>
    <span><!-- if: ${formType} === 'create' -->新增<!-- else: -->编辑<!-- /if -->菜品</span>
<!-- /block -->

<!-- target: foodNewProductFormMain(master = customFormView) -->
<!-- block: sections -->
    <!-- import: foodNewProductBaseContent -->
<!-- /block -->
<!-- block: submitSection -->
<button type="submit" data-ui-type="Button" data-ui-id="submit" data-ui-group="submit" data-ui-variants="warning wide" class="submit-button">确认提交</button>
<!-- /block -->

<!-- target: foodNewProductBaseContent -->
<section class="form-section">

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'name',
                title = '新品菜品',
                width = 300,
                required = true
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            textboxField(
                field = 'content',
                title = '菜品介绍', 
                width = 300,
                height = 160,
                mode = 'textarea'
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            foodNewProductPrice(
                field = 'price',
                title = '优惠信息',
                system = ${system}
            )
        -->
    </div>

    <div class="ui-form-row">
        <!-- use:
            uploaderWithPreviewField(
                field = 'pic', title = '菜系图片', imageWidth = 250,
                uploadUrl = ${uploadUrl}, required = true,
                descriptions = ['图片大小不超过1M']
            )
        -->
    </div>
</section>

<!-- target: foodNewProductPrice(master = formLabelValueField) -->
<!-- block: value -->
    <!-- use:
        commonPrice(
            system = ${system},
            priceField = 'price',
            oldPriceField = 'oldPrice',
            hasUnit = true
        )
    -->
<!-- /block -->
